﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.MyCustomException
{
    /// <summary>
    /// 自定义业务异常类
    /// </summary>
    public class MyCustomException : Exception
    {
        public int ErrorCode { get; }
        public MyCustomException(int errorCode, string message) : base(message)
        {
            ErrorCode = errorCode;
        }

        public MyCustomException(int errorCode, string message, Exception innerException) : base(message, innerException)
        {
            ErrorCode = errorCode;
        }

        public MyCustomException(string message) : base(message) { }

        //public void LogError()
        //{
        //    
        //}
    }
}
